package com.vhall.component.entity.guosen.enums;

import com.vhall.component.entity.dictionary.enums.BaseEnum;

/**
 * GuoXinXtgzstgGetTghInfoResponseEnum-
 * 国信 查询员工所属投顾IP信息 返回字段的枚举类
 * 接口定义：/xtgzstg/vhall/getTghInfo
 * @author xing.wang
 * @date 2023/11/3
 */

public enum GuoXinXtgzstgGetTghInfoResponseEnum implements BaseEnum {
    ZONE_ID("ID", "zoneId"),
    ZONE_NAME("名称", "zoneName"),
    SLOGAN("宣言", "slogan"),
    LOGO("图标", "logo"),
    IS_FOLLOW("1-已关注,0-未关注","isFollow"),
    ORG_CODE("组织编码", "orgCode"),
    FOLLOW_NUM("关注数", "followNum"),
    WATCH_NUM("观看数", "watchNum");

    private String name;
    private String value;

    GuoXinXtgzstgGetTghInfoResponseEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getName() {
        return name;
    }
    /**
     * 通过 value 获取 name
     * @param value
     * @return
     */
    public static String getNameByValue(String value) {
        for (GuoXinXtgzstgGetTghInfoResponseEnum e : GuoXinXtgzstgGetTghInfoResponseEnum.values()) {
            if (e.getValue().equals(value)) {
                return e.getName();
            }
        }
        return null;
    }
}
